<?php
/**
 * 年龄检查
 * User: GRAY
 * Date: 16/8/11
 * Time: 下午10:23
 */

namespace Home\Common\Hook;


use Common\Library\BusinessException;
use Common\Library\Constant;
use Common\Vendor\Hook\BaseHook;
use Think\Log;


class  SesameScore extends BaseHook
{

    public function execute($data, $params = [])
        {
            $sesame_score_pass = $data['sesame_pass'];
            if($sesame_score_pass==1) {
                return $data;
            }
            $sesame_score = $data["sesame_score"]; 
	    if($sesame_score < $params['min']){
		    BusinessException::throwException(Constant::INVALID_ZHIMA);
	    }
            return $data;
        }
} 
